package com.destiny.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.destiny.entity.Hero;
import com.destiny.entity.Skill;
import com.destiny.mapper.SkillMapper;
import com.destiny.service.SkillService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author et2110
 * @since 2022-02-25
 */
@Service
public class SkillServiceImpl extends ServiceImpl<SkillMapper, Skill> implements SkillService {

    @Autowired
    SkillMapper skillMapper;

    /**
     * 根据sid查询技能
     * @param sid
     * @return
     */
    @Override
    public List<Skill> getSkill(int sid) {
        QueryWrapper<Skill> queryWrapper = new QueryWrapper<>();
        queryWrapper.select().eq("sid",sid);
        return skillMapper.selectList(queryWrapper);
    }

}
